/**
 *
 */
package st.yushao.restaurant.dao.hibernateImpl;

import java.io.Serializable;
import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import st.yushao.restaurant.dao.FoodTypeDaoService;
import st.yushao.restaurant.vo.FoodTypeVO;


/**
 * @author wanggy
 */
public class FoodTypeDaoServiceHibImpl extends HibernateDaoSupport implements FoodTypeDaoService {

    public List<FoodTypeVO> getFoodTypeListByRest(int restId) {
        return (List<FoodTypeVO>) getHibernateTemplate().find("from FoodTypeVO where restId=?", restId);
    }

    public Serializable addFoodType(FoodTypeVO foodTypeVO) {
        return getHibernateTemplate().save(foodTypeVO);
    }

    public void updFoodType(FoodTypeVO foodTypeVO) {
        getHibernateTemplate().update(foodTypeVO);
    }
}
